<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8" />
    <link rel="icon" type="image/png" href="https://dl.dropboxusercontent.com/u/7608489/favicon.ico">
    
	<title>iSnipe - deltaBot</title>
        
    <script language="javascript" type="application/javascript" src="http://www.kryogenix.org/code/browser/sorttable/sorttable.js"></script>
    
	<!-- As the server only servers this file, we need to use
		 an internal stylesheet for making the CSS -->
	<style type="text/css">
        
		body{
			background-color:rgb(237,239,238);
            font-family: arial, sans-serif;
            font-size: 15px;
            color: rgb(89, 89, 89);
            text-shadow: rgb(255, 255, 255) 0px 2px);
            background-image: url('');
		}
		table{
			margin:auto auto 0 auto;
            
		}
		td{
			padding: 10px;
            text-shadow: 1px 4px 6px #979797;
			/*border-bottom: solid 1px #A1A1A1;*/
		}
		footer{
			text-align:center;
            text-shadow: rgb(255, 255, 255) 0px 1px 0px;
            font-family: arial, sans-serif;
            font-size: 11px;
            color: rgb(158, 158, 158);
		}
        #cod4icon{
            background-image: url('');
            background-repeat:no-repeat;
        }
        #cod6icon{
            background-image: url('');
            background-repeat:no-repeat;
        }
        
        #cod7icon{
            background-image: url('');
            background-repeat:no-repeat;
        }
        
        #cod8icon{
            background-image: url('');
            background-repeat:no-repeat;
        }
	
	</style>
</head>
<body>
    <div id="logo">

	<img src="" alt="logo" />
	
</div>
<!-- Fancy horisontal line -->
<hr>
<!-- add fancy iterating loop here-->
<table class="sortable">
<!--DELTABOT:INSERT_TABLE-->
</table>
    <script language="javascript" type="application/javascript">
        String.prototype.replaceAt = function(index, charcount) {
        return this.substr(0, index) + this.substr(index + charcount);
        }

        function sortTableAndApplyColor()
        {


            var myTH = document.getElementsByTagName("th")[0];
            sorttable.innerSortFunction.apply(myTH, []);

            //Lets convert the quake color codes to html color code in JavaScript inside the browser, this will take quite a load away from the masterserver
            var hostNameTables = document.getElementsByName("hostname");

            if( hostNameTables.length > 0){

                for( var i = 0 ; i < hostNameTables.length ; i++ ){

                    if (hostNameTables[i].innerHTML.indexOf("^") !== -1){

                        var serverName = hostNameTables[i].innerHTML.substr(0,80);                         //Cut off the string, as we don't want our table to be streched out across the entire screen, for simply 1 or 2 servers with a very long name
                        var partsOfServerName = serverName.split("^");
                        var output = "";

                        for ( var j = 0 ; j < partsOfServerName.length ; j++ ){

                            var firstChar = parseInt(partsOfServerName[j].charAt(0));

                            switch(firstChar){

                            case 0: output += "<span style=\"color:black\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 1: output += "<span style=\"color:#DF0104\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 2: output += "<span style=\"color:#00AB11\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 3: output += "<span style=\"color:#FFF300\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 4: output += "<span style=\"color:blue\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 5: output += "<span style=\"color:#7BFFFF\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 6: output += "<span style=\"color:#BB00CC\">" + partsOfServerName[j].substr(1) + "</span>"; break;
                            case 7: output += "<span style=\"color:black\">" + partsOfServerName[j].substr(1) + "</span>"; break;

                            }

                        }

                        hostNameTables[i].innerHTML = output;

                    }
                }
            }
        }

        window.onload = sortTableAndApplyColor;
    </script>
    <script language="javascript" type="application/javascript">

    </script>
<footer>
	<p><!--DELTABOT:INSERT_GENERATEDTIME_STRING-->. <!--DELTABOT:INSERT_SERVERTOTAL-->. Uptime: <!--DELTABOT:INSERT_UPTIME--></p>
    <p>&copy; <a href="http://isni.pe">iSnipe</a> 2013</p>
</footer>
</body>
</html>